package com.cursino.wilson.game.card;

import java.util.ArrayList;
import java.util.List;

/**
 * Hand class, will represent a baccarat cards, providing a custom print for the cards and the points for the cards.
 * @author <a href="mailto:"wilson.cursino@gmail.com"> Wilson Soethe Cursino </a>
 * @since 1.0
 */
public class Hand {

    private List<Card> cards;

    public Hand() {
        cards = new ArrayList<Card>();
    }

    public void addCard(Card card) {
        cards.add(card);
    }

    public int points() {
        int value = 0;
        for (Card card : cards) {
            value += card.getValue().getValue();
        }
        return value % 10;
    }

    public List<Card> getCards() {
        return cards;
    }
}
